import { RouteRecordRaw } from 'vue-router';
import { Layout } from '@/router/constant';
import { ToolOutlined } from '@vicons/antd';
import { renderIcon } from '@/utils/index';

const routes: Array<RouteRecordRaw> = [
  {
    path: '/feat',
    name: 'feat',
    component: Layout,
    meta: {
      title: '新功能',
      sort: 2,
      isRoot: true,
      activeMenu: 'feat_index',
      icon: renderIcon(ToolOutlined),
    },
    children: [
      {
        path: 'watermark',
        name: `watermark`,
        meta: {
          title: '水印',
          activeMenu: 'watermark',
          keepAlive: true
        },
        component: () => import('@/views/feat/watermark/index.vue'),
      },
      {
        path: 'image-editor',
        name: `image-editor`,
        meta: {
          title: '图片编辑',
          activeMenu: 'image-editor',
        },
        component: () => import('@/views/feat/imageEditor/index.vue'),
      },
      {
        path: 'file-download',
        name: `file-download`,
        meta: {
          title: '文件下载',
          activeMenu: 'file-download',
        },
        component: () => import('@/views/feat/fileDownload/index.vue'),
      },
      {
        path: 'mind-map',
        name: `mind-map`,
        meta: {
          title: '思维导图',
          activeMenu: 'mind-map',
          frameSrc: 'https://wanglin2.github.io/mind-map/#/',
          keepAlive: true
        },
        component: () => import('@/views/iframe/index.vue')
      },
      // {
      //   path: 'image-editor',
      //   name: `image-editor`,
      //   meta: {
      //     title: '海报编辑器',
      //     activeMenu: 'image-editor',
      //   },
      //   component: () => import('@/views/feat/imageEditor/index.vue'),
      // },
      // {
      //   path: 'image-editor',
      //   name: `image-editor`,
      //   meta: {
      //     title: '充值授权',
      //     activeMenu: 'image-editor',
      //   },
      //   component: () => import('@/views/feat/imageEditor/index.vue'),
      // },
      // {
      //   path: 'image-editor',
      //   name: `image-editor`,
      //   meta: {
      //     title: '短信包',
      //     activeMenu: 'image-editor',
      //   },
      //   component: () => import('@/views/feat/imageEditor/index.vue'),
      // },
      // {
      //   path: 'image-editor',
      //   name: `image-editor`,
      //   meta: {
      //     title: '富文本',
      //     activeMenu: 'image-editor',
      //   },
      //   component: () => import('@/views/feat/imageEditor/index.vue'),
      // },
    ],
  },
];

export default routes;
